import Vue from 'vue'
import App from './App'

// vuex
import store from './store'

import fuiIcon from "@/components/fui-icon/fui-icon.vue"

// 引入全局uView
import uView from '@/uni_modules/uview-ui'
import tmVuetify from 'tm-vuetify';

import mixin from './common/mixin'
import { router, RouterMount } from "./router/router.js"; //路径换成自己的
Vue.use(router);
Vue.use(fuiIcon);

Vue.prototype.$store = store

Vue.config.productionTip = false

App.mpType = 'app'
Vue.use(uView)
Vue.use(tmVuetify)

import tmMenubars from '@/tm-vuetify/components/tm-menubars/tm-menubars.vue';
import tmMessage from "@/tm-vuetify/components/tm-message/tm-message.vue"

Vue.use(tmMenubars)
Vue.use(tmMessage)


// #ifdef MP
// 引入uView对小程序分享的mixin封装
const mpShare = require('@/uni_modules/uview-ui/libs/mixin/mpShare.js')
Vue.mixin(mpShare)
// #endif

Vue.mixin(mixin)

const app = new Vue({
    store,
    ...App
})

// 引入请求封装
require('./util/request/index')(app)

//v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
// #ifdef H5
RouterMount(app, router, "#app");
// #endif
// #ifndef H5
app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif

